//
//  MM_UploadPicView.h
//  FootPad
//
//  Created by 张浩 on 2021/12/2.
//  Copyright © 2021 胶享悦. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MM_UploadImageModel.h"

NS_ASSUME_NONNULL_BEGIN

@class MM_UploadPicView;

typedef void(^MMUploadPicViewSuccessBlock)(NSDictionary *responeDic);//上传成功
typedef void(^MMUploadPicViewFailBlock)(NSString * message);//失败
typedef void(^MMUploadPicViewTapClickBlock)(void);//添加图片
typedef void(^MMUploadPicViewTapDeleteBlock)(MM_UploadPicView *picView);//删除图片
typedef void(^MMUploadPicViewTapErrorBlock)(void);//失败后出现的感叹号 表示是否重新传入

@interface MM_UploadPicView : UIView

@property (nonatomic, strong) MM_UploadImageModel * imageModel;

@property (nonatomic,strong) UIView * maskView;
@property (nonatomic,strong) UIButton *deleteBtn;

/*开始上传图片*/
- (void)startUploadPic;

/**
 *  所有的block 赋值
 *
 *  @param successBlock   成功
 *  @param failBlock      失败
 *  @param tapPicBlock    点击图片
 *  @param deletePicBlock 删除图片
 *  @param errorPicBlock  出现错误
 */
- (void)setSuccessBlock:(MMUploadPicViewSuccessBlock)successBlock
              failBlock:(MMUploadPicViewFailBlock)failBlock
            tapPicBlock:(MMUploadPicViewTapClickBlock)tapPicBlock
         deletePicBlock:(MMUploadPicViewTapDeleteBlock)deletePicBlock
          errorPicBlock:(MMUploadPicViewTapErrorBlock)errorPicBlock;

/*清空picView的 请求*/
- (void)clearnPicViewRequest;

/*清空picView的数据*/
- (void)clearnPicViewData;

@end

NS_ASSUME_NONNULL_END
